import 'dart:math';
void main() {
  
  //https://dart.cn/libraries/dart-math/#trigonometry
  // 余弦
  assert(cos(pi) == -1.0);

  // 正弦
  var degrees = 30;
  var radians = degrees * (pi / 180); // 将角度转换为弧度
  var sinOf30degrees = sin(radians); // 计算正弦值
  assert((sinOf30degrees - 0.5).abs() < 0.01); // 检查结果是否接近 0.5



//https://dart.cn/libraries/dart-math/#maximum-and-minimum

assert(max(1, 1000) == 1000);
assert(min(1, -1000) == -1000);

//https://dart.cn/libraries/dart-math/#math-constants
// See the Math library for additional constants.
print(e); // 2.718281828459045
print(pi); // 3.141592653589793
print(sqrt2); // 1.4142135623730951



//https://dart.cn/libraries/dart-math/#random-numbers

var random = Random();
random.nextDouble(); // Between 0.0 and 1.0: [0, 1)
random.nextInt(10); // Between 0 and 9.
var random01 = Random();
random01.nextBool(); // true or false























}